From: Brion Vibber Date: Mon, 2 Feb 2004 04:10:46 +0000 (+0000) Subject: Move sendCacheControl in checkLastMod to only go when we're chickening out on a 304 X-Git-Tag: 1.3.0beta1~1035 X-Git-Url: http://git.cyclocoop.org/%22.%24match%5B1%5D.%22?a=commitdiff_plain;h=cded871bbab870e6662de3caf7d4ba3038c96095;p=lhc%2Fweb%2Fwiklou.git Move sendCacheControl in checkLastMod to only go when we're chickening out on a 304 --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 331c01a321..6237263086 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -64,8 +64,6 @@ class OutputPage { return; } - $this->sendCacheControl(); - $lastmod = gmdate( "D, j M Y H:i:s", wfTimestamp2Unix( max( $timestamp, $wgUser->mTouched ) ) ) . " GMT"; @@ -81,7 +79,7 @@ class OutputPage { if( ($ismodsince >= $timestamp ) and $wgUser->validateCache( $ismodsince ) ) { # Make sure you're in a place you can leave when you call us! header( "HTTP/1.0 304 Not Modified" ); - header( "Last-Modified: {$lastmod}" ); + $this->sendCacheControl(); wfDebug( "CACHED client: $ismodsince ; user: $wgUser->mTouched ; page: $timestamp\n", false ); $this->disable(); return true;